/*
 * Created by JFormDesigner on Mon Apr 03 09:39:01 CST 2023
 */

package com.canteen.gui.orderinformation;

import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;

/**
 * @author s303teacher
 */
public class OrderInformation extends JFrame {
    public OrderInformation() {
        initComponents();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        orderIdLabel = new JLabel();
        orderIdInput = new JTextField();
        orderTimeLabel = new JLabel();
        customerNameLabel = new JLabel();
        customerNameInput = new JTextField();
        phoneLabel = new JLabel();
        phoneInput = new JTextField();
        orderAddressLabel = new JLabel();
        orderAddressInput = new JTextField();
        addComboButton = new JButton();
        comboPackLabel = new JLabel();
        scrollPane1 = new JScrollPane();
        comboPackInformationTable = new JTable();
        modifyComboButton = new JButton();
        deleteComboButton = new JButton();
        totalPricesLabel = new JLabel();
        comboNumberLabel = new JLabel();
        totalPricesShow = new JTextField();
        comboNumberShow = new JTextField();
        postscriptLabel = new JLabel();
        postscriptInput = new JTextField();
        submitButton = new JButton();
        cancelButton = new JButton();
        spinner1 = new JSpinner();

        //======== this ========
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("\u8ba2\u5355\u5f55\u5165");
        setResizable(false);
        var contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- orderIdLabel ----
        orderIdLabel.setText("\u8ba2\u5355\u53f7\uff1a");
        contentPane.add(orderIdLabel);
        orderIdLabel.setBounds(new Rectangle(new Point(40, 40), orderIdLabel.getPreferredSize()));
        contentPane.add(orderIdInput);
        orderIdInput.setBounds(110, 35, 150, 25);

        //---- orderTimeLabel ----
        orderTimeLabel.setText("\u8ba2\u5355\u65e5\u671f\uff1a");
        contentPane.add(orderTimeLabel);
        orderTimeLabel.setBounds(280, 40, 70, 18);

        //---- customerNameLabel ----
        customerNameLabel.setText("\u987e\u5ba2\u59d3\u540d\uff1a");
        contentPane.add(customerNameLabel);
        customerNameLabel.setBounds(35, 85, 70, 20);
        contentPane.add(customerNameInput);
        customerNameInput.setBounds(110, 85, 150, 25);

        //---- phoneLabel ----
        phoneLabel.setText("\u987e\u5ba2\u624b\u673a\uff1a");
        contentPane.add(phoneLabel);
        phoneLabel.setBounds(280, 85, 70, 20);
        contentPane.add(phoneInput);
        phoneInput.setBounds(360, 85, 150, 25);

        //---- orderAddressLabel ----
        orderAddressLabel.setText("\u987e\u5ba2\u5730\u5740\uff1a");
        contentPane.add(orderAddressLabel);
        orderAddressLabel.setBounds(35, 135, 70, 20);
        contentPane.add(orderAddressInput);
        orderAddressInput.setBounds(110, 135, 400, 25);

        //---- addComboButton ----
        addComboButton.setText("\u5957\u9910\u65b0\u589e");
        contentPane.add(addComboButton);
        addComboButton.setBounds(225, 390, 90, 30);

        //---- comboPackLabel ----
        comboPackLabel.setText("\u987e\u5ba2\u5957\u9910\u5f55\u5165\uff1a");
        contentPane.add(comboPackLabel);
        comboPackLabel.setBounds(35, 185, 95, 25);

        //======== scrollPane1 ========
        {

            //---- comboPackInformationTable ----
            comboPackInformationTable.setModel(new DefaultTableModel(
                new Object[][] {
                    {null, null, null, null, null, null},
                    {null, null, null, null, null, null},
                },
                new String[] {
                    "\u4e3b\u83dc", "\u914d\u83dc1", "\u914d\u83dc2", "\u5907\u6ce8", "\u5355\u4ef7", "\u4efd\u6570"
                }
            ) {
                Class<?>[] columnTypes = new Class<?>[] {
                    String.class, String.class, String.class, String.class, Object.class, Integer.class
                };
                @Override
                public Class<?> getColumnClass(int columnIndex) {
                    return columnTypes[columnIndex];
                }
            });
            scrollPane1.setViewportView(comboPackInformationTable);
        }
        contentPane.add(scrollPane1);
        scrollPane1.setBounds(35, 215, 480, 165);

        //---- modifyComboButton ----
        modifyComboButton.setText("\u5957\u9910\u4fee\u6539");
        contentPane.add(modifyComboButton);
        modifyComboButton.setBounds(325, 390, 90, 28);

        //---- deleteComboButton ----
        deleteComboButton.setText("\u5957\u9910\u5220\u9664");
        contentPane.add(deleteComboButton);
        deleteComboButton.setBounds(425, 390, 90, 28);

        //---- totalPricesLabel ----
        totalPricesLabel.setText("\u8ba2\u5355\u4ef7\u683c\u603b\u8ba1\uff1a");
        contentPane.add(totalPricesLabel);
        totalPricesLabel.setBounds(40, 445, 85, 25);

        //---- comboNumberLabel ----
        comboNumberLabel.setText("\u5957\u9910\u6570\u603b\u8ba1\uff1a");
        contentPane.add(comboNumberLabel);
        comboNumberLabel.setBounds(300, 445, 85, 25);
        contentPane.add(totalPricesShow);
        totalPricesShow.setBounds(135, 445, 70, 25);
        contentPane.add(comboNumberShow);
        comboNumberShow.setBounds(385, 445, 70, 25);

        //---- postscriptLabel ----
        postscriptLabel.setText("\u5907\u6ce8\uff1a");
        contentPane.add(postscriptLabel);
        postscriptLabel.setBounds(40, 500, 50, 25);
        contentPane.add(postscriptInput);
        postscriptInput.setBounds(40, 535, 470, 25);

        //---- submitButton ----
        submitButton.setText("\u8ba2\u5355\u63d0\u4ea4");
        contentPane.add(submitButton);
        submitButton.setBounds(335, 585, 97, submitButton.getPreferredSize().height);

        //---- cancelButton ----
        cancelButton.setText("\u53d6\u6d88");
        contentPane.add(cancelButton);
        cancelButton.setBounds(new Rectangle(new Point(450, 585), cancelButton.getPreferredSize()));

        //---- spinner1 ----
        spinner1.setModel(new SpinnerDateModel(new java.util.Date((System.currentTimeMillis()/60000)*60000), new java.util.Date((System.currentTimeMillis()/60000)*60000), null, java.util.Calendar.DAY_OF_MONTH));
        contentPane.add(spinner1);
        spinner1.setBounds(360, 35, 145, 25);

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for(int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        setSize(560, 665);
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JLabel orderIdLabel;
    private JTextField orderIdInput;
    private JLabel orderTimeLabel;
    private JLabel customerNameLabel;
    private JTextField customerNameInput;
    private JLabel phoneLabel;
    private JTextField phoneInput;
    private JLabel orderAddressLabel;
    private JTextField orderAddressInput;
    private JButton addComboButton;
    private JLabel comboPackLabel;
    private JScrollPane scrollPane1;
    private JTable comboPackInformationTable;
    private JButton modifyComboButton;
    private JButton deleteComboButton;
    private JLabel totalPricesLabel;
    private JLabel comboNumberLabel;
    private JTextField totalPricesShow;
    private JTextField comboNumberShow;
    private JLabel postscriptLabel;
    private JTextField postscriptInput;
    private JButton submitButton;
    private JButton cancelButton;
    private JSpinner spinner1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
